{extend name="base" /}
<!-- page specific plugin styles -->
{block name="inline-styles"}
{/block}
<!-- PAGE CONTENT BEGINS -->
{block name="content"}
<div class="page js_show">
    <div class="page__bd" style="height:100%;">
        <div class="weui-tab">
	            <div class="weui-panel weui-page-home_head" style="width: 100%;">
	                <div class="weui-panel__bd">
	                    <div class="weui-media-box user_haed">
	                            <a class="weui-media-box__hd" href="#">
	                                <img class="weui-media-box__thumb" id="avatar" src="{$avatar}" width="50" height="50">
	                            </a>
	                            <div class="weui-media-box__bd">
	                                <h4 class="weui-media-box__title" id="name"></h4>
	                                <div class="weui-media-box__info">
	                                    <span class="weui-media-box__info__grade" id="grade"></span>
	                                    <span class="weui-media-box__info__money">{$grade_name}</span>
	                                </div>
	                            </div>
	                        </div>
	                </div>
	            </div>
            <div class="weui-tab__panel " style="padding-bottom:50px;">
                    <div class="weui-panel" id="listData">
                       {foreach $sub_list as $vo}
                        <a class="weui-cell weui-cell_access" href="{if condition='$vo.direct_count > 0' }{:url('Index/agent_sub')}?sub_id={$vo.id}{/if}">
                            <div class="weui-cell__hd"><img src="{$vo.avatar}" alt="" width="34" height="34"></div>
                            <div class="weui-cell__bd">
                                <div class="weui-cell__title">{$vo.name}</div>
                            </div>
                            <div class="weui-cell__ft">
                                <div class="weui-cell__title">分销代理:{$vo.sub_count}</div>
                                <div class="weui-cell__title">直属代理:{$vo.direct_count}</div>
                            </div>
                        </a>    
                        {/foreach}
                </div>
            </div>
            <div class="weui-tabbar">
                <a href="{:url('Index/home')}" class="weui-tabbar__item ">
                    <div class="weui-tabbar__icon">
                        <i class="fa fa-home"></i>
                    </div>
                    <p class="weui-tabbar__label">主页</p>
                </a>
                <a href="{:url('Index/goods')}" class="weui-tabbar__item">
                    <div class="weui-tabbar__icon">
                        <i class="fa fa-list"></i>
                    </div>
                    <p class="weui-tabbar__label">下单</p>
                </a>
        </div>
        </div>
        
    </div>
</div>
{/block}
<!-- PAGE CONTENT ENDS -->
<!-- inline scripts related to this page -->
{block name="related-scripts"}

{/block}